import random
from tkinter import *
from tkinter import ttk
from random import shuffle

def click_button1():
    print("Случайное число")
    print(a)


a = [i for i in range(1,128)]
random.shuffle(a)

print(a)

window =Tk()
window.title("Домашнее задание")

label1 = Label(window, text = "Загадай любое число от 1 до 128")
label1.grid(column = 0, row = 0)

button1 = Button(window, text = "Введи его в окно и нажми на кнопку", command = click_button1)
button1.grid(column = 0, row = 1)

edit1 = Entry(window, width =20)
edit1.grid(column = 1, row = 1)

table1 = ttk.Treeview(window)
table1['columns'] = ('unsorted', 'sorted')

table1.grid(column = 0, row = 3)
table1.insert(parent="",index="end", iid = 1, values = ("За 1 урок", 'Это все, что я смогла'))


my_table = ttk.Treeview(window)

my_table['columns'] = ('unsorted', 'sorted')
for i in range (1):
    print(str(a[i])) #,str(a_sorted[i]))
    my_table.insert(parent="",index="end",iid=i,text="",values=(str(a[i])) )#,str(a_sorted[i])))
my_table.grid(column=0,row=2)

window.mainloop()